#ifndef UNREALBRUSH_H
#define UNREALBRUSH_H

#include <QMainWindow>
#include <QImage>
#include <QLabel>
#include <QScrollArea>

#include "Model.h"
#include "AbstractModelObserver.h"
#include "ui_UnrealBrush.h"


class UnrealBrush : public QMainWindow, public AbstractModelObserver
{
    Q_OBJECT

public:
    UnrealBrush(QWidget *parent = 0, Qt::WFlags flags = 0);
    void OnImageUpdated(bool updateHistogram);
    ~UnrealBrush();

private:
    Ui::UnrealBrushClass ui;
    QImage* image;
    Model* model;
	void DrawHistogram();

private slots:
	void on_brightnessOkBtn_clicked();
	void on_okContrastBtn_clicked();
    void open();
    void inverse();
    void grayscale();
    void resizeDirectMapping();
    void resizeReverseMapping();
    void blurWeighted();
    void blurMean();
    void flipVertically();
    void flipHorizontally();
    void sharpenPoint();
    void sharpenHorizontalLine();
    void sharpenVerticalLine();
    void sharpenRightDiagonalLine();
    void sharpenLeftDiagonalLine();
    void detectPoint();
    void detectHorizontalLine();
    void detectVerticalLine();
    void detectRightDiagonalLine();
    void detectLeftDiagonalLine();
	void basicGlobalThresholding();
	void optimumGlobalThresholding();
	void adaptiveThresholding();
	void contrastSlideBarChanged(int value);
	void brightnessSlideBarChanged(int value);
};

#endif // UNREALBRUSH_H
